<template>
  <div>
    <el-page-header @back="goBack" content="详情页面">
    </el-page-header>
    <el-descriptions title="床位信息" class="margin-top" :column="3" :size="size" border>
      <el-descriptions-item label="床位id">{{ bedInfo.bid }}</el-descriptions-item>
      <el-descriptions-item label="床位编号">{{ bedInfo.bnum }}</el-descriptions-item>
      <el-descriptions-item label="医院名称">{{ bedInfo.tbHospital.hname }}</el-descriptions-item>
      <el-descriptions-item label="科室名称">{{ bedInfo.tbDepartment.dname }}</el-descriptions-item>
      <el-descriptions-item label="设备型号">{{ bedInfo.type }}</el-descriptions-item>
      <el-descriptions-item label="厂家联系地址">{{ bedInfo.manufacturerAddress }}</el-descriptions-item>
      <el-descriptions-item label="厂家联系电话">{{ bedInfo.manufacturerPhone }}</el-descriptions-item>
      <el-descriptions-item label="厂家联系人">{{ bedInfo.manufacturerContacter }}</el-descriptions-item>
      <el-descriptions-item label="添加时间">{{ bedInfo.addTime }}</el-descriptions-item>
      <el-descriptions-item label="状态">
        <el-tag v-if="bedInfo.status == 0" type="success">空闲中</el-tag>
        <el-tag v-if="bedInfo.status == 1">使用中</el-tag>
        <el-tag v-if="bedInfo.status == 2" type="danger">异常</el-tag>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>
<script>

export default {
  data() {
    return {
      bedInfo: {},
    }
  },
  methods: {
    goBack() {
      this.$router.push({path: '/Home/Fault'})
    }
  },
  created() {
    this.bedInfo = this.$route.query.bedInfo;
  }
}
</script>
